package com.tj.collection.controller.admin.request;


import com.fqgj.common.api.ParamsObject;
import com.fqgj.common.utils.StringUtils;
import com.fqgj.exception.common.ApiIllegalArgumentException;

/**
 * Created with IntelliJ IDEA.
 * User: sm
 * Date: 2016/11/18
 * Time: 上午10:30
 */
public class AddRoleVo extends ParamsObject {

    private String name;

    private String description;

    public String getName() {
        return name;
    }

    public AddRoleVo setName(String name) {
        this.name = name;
        return this;
    }

    public String getDescription() {
        return description;
    }

    public AddRoleVo setDescription(String description) {
        this.description = description;
        return this;
    }


    @Override
    public void validate() {
        if (StringUtils.isEmpty(name.trim())) {
            throw new ApiIllegalArgumentException("角色名必填");
        }
    }
}
